# Maintainer: Levente Polyak <levente[at]leventepolyak[dot]net>
# Contributor: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>

pkgname=vit
pkgver=2.3.0
pkgrel=1
pkgdesc='Terminal interface for Taskwarrior with Vim key bindings and colorization'
url='https://github.com/vit-project/vit'
arch=('any')
license=('MIT')
depends=('task' 'python' 'python-urwid' 'python-tasklib')
makedepends=('python-setuptools')
source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('08224e46be56a96433a83ba69a44755a792d5a07c13482f3b165ce4b54394695')
b2sums=('40c45eee0943c9f9ca7d4b96dfafa75936197807fe9c1aa80144a7ac3ab37ac526b67258a74836ae01a00ba4fb4ac305f9edccd5726ef38466b8c73cbb210246')

build() {
  cd ${pkgname}-${pkgver}
  python setup.py build
}

check() {
  cd ${pkgname}-${pkgver}
  # TODO: requires python-terminal
  # ./run-tests.sh
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install --root="${pkgdir}" -O1 --skip-build
  install -Dm 644 scripts/bash/vit.bash_completion "${pkgdir}/usr/share/bash-completion/completions/vit"
  install -Dm 644 *.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
